package cn.mes.module.mes.controller.admin.baseworkplan.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;
import cn.mes.framework.excel.core.annotations.DictFormat;
import cn.mes.framework.excel.core.convert.DictConvert;

@Schema(description = "管理后台 - 任务单信息 Response VO")
@Data
@ExcelIgnoreUnannotated
public class BaseWorkPlanRespVO {

    @Schema(description = "任务单信息ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "18525")
    @ExcelProperty("任务单信息ID")
    private String id;

    @Schema(description = "任务单号", requiredMode = Schema.RequiredMode.REQUIRED, example = "10588")
    @ExcelProperty("任务单号")
    private String workPlanId;
    @Schema(description = "机台名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "10588")
    @ExcelProperty("机台名称")
    private String machineName;

    @Schema(description = "任务单内码", example = "3361")
    @ExcelProperty("任务单内码")
    private String workPlanInterId;

    @Schema(description = "产品名称", example = "张三")
    @ExcelProperty("产品名称")
    private String productName;
    @Schema(description = "产品料号", example = "张三")
    @ExcelProperty("产品料号")
    private String productId;

    @Schema(description = "客户ID", example = "21202")
    @ExcelProperty("客户ID")
    private String customerId;

    @Schema(description = "客户名称", example = "芋艿")
    @ExcelProperty("客户名称")
    private String customerName;

    @Schema(description = "计量单位名称", example = "李四")
    @ExcelProperty("计量单位名称")
    private String unitName;

    @Schema(description = "计量单位编号", example = "4998")
    @ExcelProperty("计量单位编号")
    private String unitId;

    @Schema(description = "客户料号", example = "29028")
    @ExcelProperty("客户料号")
    private String customerProductId;

    @Schema(description = "产品机种", example = "1")
    @ExcelProperty("产品机种")
    private String machineType;

    @Schema(description = "机种件别")
    @ExcelProperty(value = "机种件别", converter = DictConvert.class)
    @DictFormat("mes_machine_item") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private String machineItem;

    @Schema(description = "产品简称", example = "张三")
    @ExcelProperty("产品简称")
    private String productShortName;

    @Schema(description = "生产组别")
    @ExcelProperty("生产组别")
    private String productGroup;

    @Schema(description = "生产组编码")
    @ExcelProperty("生产组编码")
    private String productGroupCode;


    @Schema(description = "任务单类型", example = "1")
    @ExcelProperty("任务单类型")
    private String workPlanType;

    @Schema(description = "任务单类型编码")
    @ExcelProperty("任务单类型编码")
    private String workPlanTypeCode;

    @Schema(description = "车间ID", example = "31371")
    @ExcelProperty("车间ID")
    private String workShopId;

    @Schema(description = "车间名称", example = "李四")
    @ExcelProperty("车间名称")
    private String workShopName;

    @Schema(description = "车间名称编码")
    @ExcelProperty("车间名称编码")
    private String workShopCode;

    @Schema(description = "计划产量")
    @ExcelProperty("计划产量")
    private Long workPlanProductNum;

    @Schema(description = "计划开始时间")
    @ExcelProperty("计划开始时间")
    private LocalDateTime planStartTime;

    @Schema(description = "计划结束时间")
    @ExcelProperty("计划结束时间")
    private LocalDateTime planEndTime;

    @Schema(description = "实际开始时间")
    @ExcelProperty("实际开始时间")
    private LocalDateTime actualStartTime;

    @Schema(description = "实际结束时间")
    @ExcelProperty("实际结束时间")
    private LocalDateTime actualEndTime;

    @Schema(description = "工单状态", example = "2")
    @ExcelProperty("工单状态")
    private Integer status;

    @Schema(description = "发料人编号", example = "21327")
    @ExcelProperty("发料人编号")
    private String distributeManagerId;

    @Schema(description = "收料人编号", example = "30550")
    @ExcelProperty("收料人编号")
    private String receiveManagerId;

    @Schema(description = "模具编号")
    @ExcelProperty("模具编号")
    private String moldNo;

    @Schema(description = "模穴数量")
    @ExcelProperty("模穴数量")
    private Integer moldCaveNum;

    @Schema(description = "切换方式", example = "2")
    @ExcelProperty("切换方式")
    private Integer exchangeType;

    @Schema(description = "是否模具共用")
    @ExcelProperty("是否模具共用")
    private Boolean isMoldSame;

    @Schema(description = "包规数量")
    @ExcelProperty("包规数量")
    private Long quantity;

    @Schema(description = "制单时间")
    @ExcelProperty("制单时间")
    private LocalDateTime generateDateTime;

    @Schema(description = "制单人")
    @ExcelProperty("制单人")
    private String generateUser;

    @Schema(description = "结案时间")
    @ExcelProperty("结案时间")
    private LocalDateTime closeDateTime;

    @Schema(description = "创建时间")
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

}